/**
 * There are code generation
 */
package com.neusoft.lohas.modules.ivm.dao.merchant;

import org.springframework.stereotype.Repository;

import com.neusoft.lohas.common.persistence.BaseDao;
import com.neusoft.lohas.common.persistence.Parameter;
import com.neusoft.lohas.modules.ivm.entity.merchant.Merchant;

/**
 * 商户DAO接口
 * @author Jackie.Liu
 * @version 2014-10-22
 */
@Repository
public class MerchantDao extends BaseDao<Merchant> {
	
	public Merchant findByCreateBy(String createBy){
		return getByHql("from Merchant where createBy.id = :p1 and delFlag = :p2", new Parameter(createBy, Merchant.DEL_FLAG_NORMAL));
	}
	
	public Merchant findById(String id){
		return getByHql("from Merchant where id = :p1 and delFlag = :p2", new Parameter(id, Merchant.DEL_FLAG_NORMAL));
	}
}
